package com.wfx.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.wfx.entity.WxbGoodsSpec;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zhu
 * @since 2021-01-21
 */
public interface WxbGoodsSpecMapper extends BaseMapper<WxbGoodsSpec> {

    //搜索 分页加条件
    IPage search(IPage iPage, WxbGoodsSpec wxbGoodsSpec);

    //删除
    @Delete("DELETE sp,op FROM wxb_goods_spec as sp \n" +
            "LEFT JOIN wxb_goods_spec_options as op ON sp.id=op.spec_id WHERE sp.id=#{id}")
    int del(int id);


    //保存
    int saveSpce(WxbGoodsSpec wxbGoodsSpec);





}
